package com.example.administrator.easy.adapter;

import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;

import java.util.List;

/**
 * Created by jingsheng on 2016/11/15.
 */

public class FragmentVideoAdapter extends FragmentPagerAdapter {//

    private List<Fragment> list;
    String chat[];

    public FragmentVideoAdapter(FragmentManager fm, List<Fragment> list,String chat[]) {
        super(fm);
        this.list = list;
        this.chat=chat;
    }

    @Override
    public Fragment getItem(int position) {
        return list.get(position);
    }

    @Override
    public int getCount() {
        return list.size();
    }

    @Override
    public int getItemPosition(Object object) {
        return super.getItemPosition(object);
    }

    @Override
    public CharSequence getPageTitle(int position) {
        return chat[position];
    }
}
